#include <stdio.h>

void my_sort(int arr[], int len);

int main() {
	int arr[] = {1, 34, 5, 3, 34, 23, 43, 2, 10};
	int len = sizeof(arr) / sizeof(arr[0]);

	my_sort(arr, len);

	for (int i = 0; i < len; i++) {
		printf("%d ", arr[i]);
	}

	return 0;
}

void my_sort(int arr[], int len) {
	for (int i = 0; i < len; i++) {
		int imin = i;
		for (int j = i + 1; j < len; j++) {
			if (arr[j] < arr[imin]) {
				imin = j;
			}
		}
		if (imin != i) {
			int tmp = arr[i];
			arr[i] = arr[imin];
			arr[imin] = tmp;
		}
	}
}